GetValue
TheGetValue
method reads data from the focused value, starting at the offset (inclusive).
ODULong GetValue (in ODULong length, out ODByteArray value);
length
- The length (number of bytes) of data to read, expressed as an unsigned 32-bit value.
value
- A byte array structure to contain the retrieved data.
- return value
- The number of bytes read, expressed as an unsigned 32-bit value.
DISCUSSION
You call this method to read data from the focused value. If that value is a promise value, the promise is fulfilled before the data is read. This method starts reading data at the current offset and stops after reading the number of bytes specified by thelength
parameter or after reaching the end of the data in the currently focused value, whichever comes first.When you call this method, the
_buffer
field of thevalue
output parameter should bekODNULL
; if it isn't, the buffer to which that field points will not be deallocated.This method sets the
_buffer
field of thevalue
output parameter to point to a memory block containing the data that is read from the storage unit; it sets the_maximum
field to the specified length and the_length
field to the number of bytes actually read.When you no longer need the structure you pass as the
value
parameter, you should deallocate that structure and its buffer.EXCEPTIONS
If the storage-unit cursor for this storage-unit view does not represent a legal focus context for the storage unit that created this storage-unit view, this method throws exceptions raised by the
kODErrUnfocusedStorageUnit
- The focus context of this storage-unit view is not a value.
FocusWithCursor
method of that storage unit.SEE ALSO
TheODByteArray
type (page 877).
TheODStorageUnitView::GetSize
method (page 742).
TheODStorageUnitView::SetValue
method (page 760).
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help